package com.tsll.entity;

import java.io.Serializable;

/**
 * 
 * @TableName purchasebookinfo
 */
public class PurchaseBookInfo implements Serializable {
    private PurchaseInfo purchaseInfo;

    public PurchaseInfo getPurchaseInfo() {
        return purchaseInfo;
    }

    public void setPurchaseInfo(PurchaseInfo purchaseInfo) {
        this.purchaseInfo = purchaseInfo;
    }

    private Booktype boktype;

    public Booktype getBoktype() {
        return boktype;
    }

    public void setBoktype(Booktype boktype) {
        this.boktype = boktype;
    }

    private Staff staff;

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    /**
     * 编号
     */
    private Integer id;


    /**
     * 状态
     */
    private  Integer status;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 图书名
     */
    private String booksName;

    /**
     * 图书类型
     */
    private Integer booktypeId;

    /**
     * 图书单价
     */
    private Double bookPrice;

    /**
     * 采购数量
     */
    private Integer booksCount;

    /**
     * 采购信息id
     */
    private Integer purchaseinfoId;

    private Booktype booktype;

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 图书名
     */
    public String getBooksName() {
        return booksName;
    }

    /**
     * 图书名
     */
    public void setBooksName(String booksName) {
        this.booksName = booksName;
    }

    /**
     * 图书类型
     */
    public Integer getBooktypeId() {
        return booktypeId;
    }

    /**
     * 图书类型
     */
    public void setBooktypeId(Integer booktypeId) {
        this.booktypeId = booktypeId;
    }

    /**
     * 图书单价
     */
    public Double getBookPrice() {
        return bookPrice;
    }

    /**
     * 图书单价
     */
    public void setBookPrice(Double bookPrice) {
        this.bookPrice = bookPrice;
    }

    /**
     * 采购数量
     */
    public Integer getBooksCount() {
        return booksCount;
    }

    /**
     * 采购数量
     */
    public void setBooksCount(Integer booksCount) {
        this.booksCount = booksCount;
    }

    /**
     * 采购信息id
     */
    public Integer getPurchaseinfoId() {
        return purchaseinfoId;
    }

    /**
     * 采购信息id
     */
    public void setPurchaseinfoId(Integer purchaseinfoId) {
        this.purchaseinfoId = purchaseinfoId;
    }


    public Booktype getBooktype() {
        return booktype;
    }

    public void setBooktype(Booktype booktype) {
        this.booktype = booktype;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PurchaseBookInfo other = (PurchaseBookInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBooksName() == null ? other.getBooksName() == null : this.getBooksName().equals(other.getBooksName()))
            && (this.getBooktypeId() == null ? other.getBooktypeId() == null : this.getBooktypeId().equals(other.getBooktypeId()))
            && (this.getBookPrice() == null ? other.getBookPrice() == null : this.getBookPrice().equals(other.getBookPrice()))
            && (this.getBooksCount() == null ? other.getBooksCount() == null : this.getBooksCount().equals(other.getBooksCount()))
            && (this.getPurchaseinfoId() == null ? other.getPurchaseinfoId() == null : this.getPurchaseinfoId().equals(other.getPurchaseinfoId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBooksName() == null) ? 0 : getBooksName().hashCode());
        result = prime * result + ((getBooktypeId() == null) ? 0 : getBooktypeId().hashCode());
        result = prime * result + ((getBookPrice() == null) ? 0 : getBookPrice().hashCode());
        result = prime * result + ((getBooksCount() == null) ? 0 : getBooksCount().hashCode());
        result = prime * result + ((getPurchaseinfoId() == null) ? 0 : getPurchaseinfoId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", booksName=").append(booksName);
        sb.append(", booktypeId=").append(booktypeId);
        sb.append(", bookPrice=").append(bookPrice);
        sb.append(", booksCount=").append(booksCount);
        sb.append(", purchaseinfoId=").append(purchaseinfoId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}